package com.zmj.dubbo.handler;

import io.netty.channel.ChannelHandlerContext;
import io.netty.channel.ChannelInboundHandlerAdapter;
import lombok.extern.slf4j.Slf4j;

/**
 * RPC代理处理服务端响应 Handler
 * @author zhangmj
 * @date 2018/9/22 00:41
 */
@Slf4j
public class RpcProxyHandler extends ChannelInboundHandlerAdapter {

    private Object response;

    public Object getResponse(){
        return  response;
    }

    @Override
    public void channelRead(ChannelHandlerContext ctx, Object msg) throws Exception {
        log.info("收到返回信息：" + msg);
        response = msg;
    }
}
